<template>
	<!-- 订单列表项 -->
	<u-cell
		class="item-wrapper"
		:border="false"
		@click="onClickItem()"
	>
		<div slot="title" class="flex flex-center" style="margin-bottom: 12rpx;">
			<u-avatar :src="orderData.shopImg" size="50rpx"/> <text style="margin-left: 12rpx;">{{orderData.shopName}}</text>
		</div>
		<div slot="label" >
			<div class="flex">
				<!-- 左边图片 -->
				<div>
					<u-image width="200rpx" height="200rpx" radius="10" :src="orderData.poster"/>
				</div>
				<!-- 右边订单信息 -->
				<div style="width:0;flex:1;margin-left: 12rpx;">
					<div style="font-size: 36rpx;font-weight: bold;">{{orderData.orderTitle}}</div>
					
				</div>
			</div>
			<div style="justify-content: space-between;margin-top: 12rpx;" class="flex flex-center">
				<div>{{orderData.createdTime}}</div>
				<div>
					订单总金额：<span>￥{{orderData.totalPrice}}</span>
				</div>
			</div>
		</div>
	</u-cell>
</template>

<script>
	export default {
		props: {
			// 订单数据
			orderData: {
				type: Object,
				required: true,
			},
		},
		data() {
			return {
				
			}
		},
		onLoad() {
		},
		methods: {
			// 点击订单项
			onClickItem(){
				let {orderData} = this;
				uni.navigateTo({
					url: '/pages/yuYue/orderDetail/orderDetail?uid=' + orderData.uid
				})
			},
		}
	}
	
</script>

<style scoped>
	.item-wrapper{
		background-color: #FFFFFF;
	}
</style>
